Skip to content

Add tuning parameters for the similarity profiles of the surface layer#4

Open
wlanghans wants to merge 9 commits intowolfgang/rebase_sofar-071124_on_mainfrom
wolfgang/add_sl_tuning
Open

Add tuning parameters for the similarity profiles of the surface layer#4
wlanghans wants to merge 9 commits intowolfgang/rebase_sofar-071124_on_mainfrom
wolfgang/add_sl_tuning

Conversation

@wlanghans
Copy link
Copy Markdown

@wlanghans wlanghans commented May 14, 2025

Description

This PR adds two tuning parameters, one to tune the surface layer parameterization during stable, and one to tune it during unstable conditions. The default values correspond to the original formulation. These two parameters have an effect only over water surfaces when the land/sea/ice mask takes a value of 0 and when tune_ocean_surface_layer=True. Otherwise, the standard parameterization is used and the tuning parameters have no effect.

For consistency, these same modified profiles are also used in the PBL schemes satmedmfvdiff, satmedmfvdiffq, and moninedmf.

The design of these tuning coefficient is as follows:

  • Stable regime: The original formulation is a linear function of stability. The slope of this empirical fit corresponds to the inverse of the critical Richardson number and is per default set to 5 for both momentum and scalars. Based on measurement campaigns this slope - named alpha_stable in the code - may take on a value in the range of about [4-10] (see Hogstrom (1988) and Long (1986)). A larger value implies a smaller critical Richardson number, thus less turbulent drag. The tuning parameter sets the slope for both momentum and scalars to maintain a Prandtl number of one.
  • Unstable regime: The original formulation of the dimensionless gradient of momentum follows a (1-alpha*Zeta)**-0.25 law, whereby alpha is 16 following Dyer (1974) and Hicks (1976). The formulation for the gradient for scalars is the square root of it. Note that a numerical approximation is implemented (see Eqs. 2.37 and 2.64 in Long (1990)) that is baed on alpha=16. If tune_ocean_surface_layer=True, the gradient for momentum is computed on the unapproximated form (see Eq. 2.19 in Long (1990) (with fixed signs)) which differs slightly from the approximation even for alpha=16 of instabilities are very large. Per design, the Prandtl number, ratio of gradient of heat to momentum, is one for neutral conditions and drops down to around 0.4 for largely unstable conditions. Various measurement campaigns came up with different values for alpha (see Hogstrom, 1988) and the range roughly spans [10, 30]. Note that the Prandtl number is largely determined by the different exponents used in the momentum versus heat gradients, rather than by the value of alpha used in each. On top of this, other empirical formulations use separate values for alpha for momentum and heat. For this reason, the tuning variable added here only affects the alpha used in the dimensionless gradient of momentum.

References:
-Dyer, 1974: A review of flux-profile relations. Bound. Layer Meteor., 7, 363-372.
-Hicks, 1976: Wind profile relationships from the Wangara experiment. QJRMS, 102, 535-551.
-Hogstrom, 1988: Non-dimensional wind and temperature profiles in the atmospheric surface layer: A re-evaluation. Boundary-Layer Meteorol., 42, 55-78.
-Long, 1986: An economical and compatible scheme for parameterizing the stable surface layer in the medium range forecast model. Office note 321, NOAA.
-Long, 1990: Derivation and suggested method of the application of simplified relations for the surface fluxes in the medium-range forecast model: Unstable case. Office note 356, NOAA.

How Has This Been Tested?
No.

Checklist:

Please check all whether they apply or not

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Wolfgang Langhans added 2 commits May 13, 2025 15:47
Copy link
Copy Markdown
Collaborator

@StevePny StevePny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments. As long as there are no breaking changes, I think this can be merged as soon as it's tested.

Comment thread GFS_layer/GFS_typedefs.F90 Outdated
Comment thread GFS_layer/GFS_typedefs.F90 Outdated
Comment thread gsmphys/sfc_diff_gfdl.f

call monin_obukhov_similarity
& (z1(i), snwdph(i), thv1, wind(i), z0max, ztmax, tvs,
& (islimsk(i), z1(i), snwdph(i), thv1, wind(i), z0max,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're adding a new argument, I'd feel better in terms of backwards compatibility if it is put at the end of the argument list and made an optional argument (i.e. uses a default value if it is not provided).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Backwards compatibility means that old results are achievable after changing code. This subroutine, and the whole PR, is setup to be backward compatible with the logical flag tune_ocean_surface_layer per default set to false; this makes sure results are unchanged per default. Even if the flag is true, the alphas are set to the default value unless changed through the config. For the order of arguments, it is Fortran standard to have inputs come first and outputs after that. All calls to this subroutine need these new arguments to support this tuning feature. In that sense, they are not optional.
Please let me know if that does not answer your comment appropriately or you still have concerns.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me @wlanghans, switching the order would be more confusing since I (and any Fortran user) should expect inputs to come before output arguments. As long as the default works and doesn't change results (i.e. is backward compatible), I think this works well.

Comment thread gsmphys/sfc_diff_coupled.f
Wolfgang Langhans added 4 commits May 14, 2025 09:41
…d tuning by using the modified similarity functions to define phim and phih in satmedmfvdiff, satmedmfvdiffq, and moninedmf; a subroutine to compute the similarity functions has been created to avoid redundancy
Copy link
Copy Markdown

@miguelsolanocordoba miguelsolanocordoba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and would be good to merge after testing that that default behavior (tune_ocean_surface_layer=False) does indeed return identical results (i.e. that it is backward compatible).
I like the idea of tuning stable/unstable regimes separately. There is enough uncertainty in these "universal" tuning parameters (alpha) to justify their tuning around these ranges.

@wlanghans
Copy link
Copy Markdown
Author

I'm adding a plot here to show the difference between the approximated and currently used similarity function during unstable conditions and the un-approximated similarity function used in this PR. The difference is notable only for really large instabilities.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants